#!/bin/bash
# vim: fdm=marker fmr=[[[,]]] cms=\ #%s

[[ -z $SOAR ]] && SOAR=/opt/soar
PATH=$PATH:$SOAR/common/bash/soar
. soar.sh

main()
{
    if [[ -z $SVCENV_CNFG ]]
    then
        echo "Error: SVCENV_CNFG not set"
        return 1
    fi

    downagent
    if (( $? != 0 ))
    then
        return 1
    fi

    local svr
    for svr in $(cnfg_property_array $SVCENV_CNFG SERVER)
    do
        svr=${svr#svr_}
        downsvr $svr
    done
}

main
exit $?
